package com.server.app;

import com.webserver.server.app.Plugin;
import com.webserver.server.app.ServerApp;
import com.webserver.server.net.ReServerCallBack;

/**
 * Hello world!
 *
 */
public class App 
{
    public static void main( String[] args ) throws Exception
    {
    	final ServerApp app = ServerApp.getInstance();
    	
    	app.registPlugin(new Plugin()
        {
			public void onAppStart() throws Exception {
				
				System.out.println("----------------service start----------------");
			}
		

			public void onAppStop() throws Exception {
				System.out.println("----------------service stop----------------");
			}
        });
    	
    	app.start();
    	app.SetUserOfflineCallBack(
    			new ReServerCallBack(){
					public void ServerCallBack(Object obj) {
						//long uid = Long.parseLong(obj.toString());
						//TODO 玩家离线
					}
    			}
    		);
    	GameWorld.GetInstance().StartGame();
    }
}
